<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>My JSP 'index.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
<script type="text/javascript" src="js/jquery-1.8.2.js"></script>
<script type="text/javascript">
	function openul()
	{
		//设置签到按钮不可用
		document.getElementById("signin").disabled=true;
		document.getElementById("signout").disabled=false;
	}
	function sgout()
	{
		//设置签到按钮不可用
		document.getElementById("signin").disabled=true;
		document.getElementById("signout").disabled=true;
	}
	
</script>
<style type="text/css">
	body{
		background-color: #E3F5FA;
		height:1000px;
	}
</style>
<sx:head/>
</head>

<body onload="javascript:openul()">
	<p>>>当前位置：员工签到、签退</p>
	<br />
	<div style="border: 1px #add9c0 solid">
	<center>
    	<s:form action="dosignin">
    		<table>
    			<tr>
    				<td>签卡日期：</td>
    				<td><s:textfield name="signtime" id="signtime" value="%{#session.now}"></s:textfield></td>
    				<td><sx:submit value="签到" name="method:signin" targets="signdescym" id="signin" onclick="javascript:openul()"></sx:submit></td>
    				<td><sx:submit value="签退" name="method:signoff" targets="signdescym" id="signout" onclick="javascript:sgout()"></sx:submit></td>
    			</tr>
    			<tr>
    				<td>签卡备注：</td>
    				<td colspan="3"><s:textarea rows="15" cols="50" name="signdesc"></s:textarea></td>
    			</tr>
    		</table>
    	</s:form>
    </center>
    </div>
    <br />
    <center>
    <div id="signdescym"></div>
    </center>
  </body>
</html>